package ${location}.config;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;

import java.io.IOException;

/**
 * @author ${author}
 */
public class StringConfig extends StdDeserializer<String> {

	private static final long serialVersionUID = 1L;

	public StringConfig(Class<String> vc) {
		super(vc);
	}

	@Override
	public String deserialize(JsonParser p, DeserializationContext deserializationContext) throws IOException {
		return p.getText() != null ? p.getText().trim() : null;
	}
}
